# coding: UTF-8


class Settings(object):
    """【类】参数设置"""

    def __init__(self):
        """【类方法】初始化"""

        self.fig_DPI = 1000          # 单位：DPI
        self.w_h_ratio = 4 / 3         # 宽高比
        self.fig_width = 8.0  # 【SCI插图规范】图片（半版图）宽度：8cm
        self.fig_height = self.fig_width * (1 / self.w_h_ratio)  # 比例为4:3则设置为6；比例为3:2则设置为5.33

        self.font_size = 12  # 【SCI插图规范】字体大小：8~12号之间，不超过14号
        # 一般字体统一用一个字典控制：plt.text(x, y, "text", fontdict=font)
        self.font = {"family": "Times New Roman",
                    # "style": "italic",
                    "weight": "normal",
                    "color": "black",
                    "size": 12}

        self.line_width = 1.5  # 【SCI插图规范】线条宽度：0.25~1.5pt之间

        return None


if (__name__ == "__main__"):

    INS_settings = Settings()

    print("\n" + "【当前设置信息】")
    print("===" * 10)

    print("图片宽度:", INS_settings.fig_width, "cm")
    print("图片高度:", INS_settings.fig_height, "cm")
    print("图片比例: %.2f" % INS_settings.w_h_ratio)  # 显示比例可以考虑用if语句

    print("")
